package com.tyk.bookstore.back.product.model.result;


import com.tyk.bookstore.back.common.core.model.result.ResultEnum;

/**
 * @author tyk
 * @description 分类异常枚举
 */
public enum ClazzResultEnum implements ResultEnum {

    CLAZZ_NOT_FOUND(3_05_04_01, "分类不存在"),
    CLAZZ_ALREADY_EXISTS(3_05_04_02, "分类已存在"),
    CLAZZ_PARENT_NOT_FOUND(3_05_04_03, "父级分类不存在"),
    CLAZZ_PARENT_HAS_BOOK(3_05_04_04, "父级分类下存在书籍"),
    CLAZZ_HAS_BOOK(3_05_04_05, "书店仍存在该分类的书籍"),
    CLAZZ_HAS_CHILD(3_05_04_06, "分类存在下级");

    private final String msg;
    private final Integer code;

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }

    ClazzResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
